package com.baselibrary.permission;

import android.Manifest;

/**
 * @author: 关忆北、
 * @date: 2022/3/11
 * @Des：权限分类
 */
public enum PermissionCollection {
    //文件
    FILE(Manifest.permission.WRITE_EXTERNAL_STORAGE),
    //相机和文件
    CAMERA(Manifest.permission.CAMERA, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE),
    //手机、通话记录
    PHONE(Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_CALL_LOG, Manifest.permission.WRITE_CALL_LOG,
            Manifest.permission.CALL_PHONE, Manifest.permission.WRITE_CONTACTS, Manifest.permission.READ_CONTACTS),
    //位置
    LOCATION(Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION),
    //麦克风
    MICROPHONE(Manifest.permission.RECORD_AUDIO),
    //传感器
    SENSORS(Manifest.permission.BODY_SENSORS),
    CALL_PHONE(Manifest.permission.CALL_PHONE),
    //短信
    SMS(Manifest.permission.SEND_SMS, Manifest.permission.RECEIVE_SMS, Manifest.permission.READ_SMS),
    //日历
    CALENDAR(Manifest.permission.READ_CALENDAR, Manifest.permission.WRITE_CALENDAR),
    CUSTOM();

    PermissionCollection(String... permissionList) {
        this.permissionList = permissionList;
    }

    PermissionCollection() {
    }

    public String[] addPermissionList(String... permissionList) {
        return permissionList;
    }

    public String[] permissionList;

    public String[] getPermissionList() {
        return permissionList;
    }
}
